<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>密码修改</title>
<link rel="stylesheet"
	href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
<script
	src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script
	src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript">
	function check() {
		var p1 = document.form.newPassword.value;
		var p2 = document.form.confirm.value;

		if (p1 != p2) {
			alert("两次密码不一样,请重新输入!");
			return false;
		} else {
			return true;
		}
	}
</script>
</head>
<body>

	<jsp:include page="navbar.jsp" />


	<div class="py-5">
		<div class="container">
			<div class="row">
				<div class="col-md-12">
					<h1 class="display-1 text-center">修改密码</h1>
				</div>
			</div>
		</div>
	</div>
	<div class="py-5">
		<div class="container">
			<div class="row">
				<div class="col-md-4"></div>
				<div class="col-md-4">
					<form action="pwdModify.action" method="post" name="form" onsubmit="return check();">
						<div class="form-group">
							<label>原密码 *</label> <input type="password" class="form-control"
								placeholder="输入原密码" name="oldPassword" required="required">
						</div>
						<div class="form-group">
							<label>新密码 *</label> <input type="password" class="form-control"
								placeholder="输入新密码" name="newPassword" required="required">
						</div>
						<div class="form-group">
							<label>确认密码 *</label> <input type="password" class="form-control"
								placeholder="再次确认" name="confirm" required="required">
						</div>
						<div class="form-group">
							<button type="submit" class="btn btn-success">修改</button>
							<input type="button" class="btn btn-primary" name="button"
								value="取消" onclick="javascript:history.go(-1)" />
						</div>
					</form>
					<font color="red">${requestScope.errorMessage}</font>
				</div>
				<div class="col-md-4"></div>
			</div>
		</div>
	</div>
</body>
</html>